package ru.evga.inse.core.service.dict;

import ru.evga.inse.core.dao.DaoException;
import ru.evga.inse.core.dao.IResultContainer;
import ru.evga.inse.core.domain.dict.City;
import ru.evga.inse.core.filter.dict.CityFilter;
import ru.evga.inse.core.rpc.RpcParamName;
import ru.evga.inse.core.service.IEntityService;


public interface ICityService
    extends IEntityService<City>
{
    /**
     * Persists city object
     */
    City save(@RpcParamName("id") Long id, @RpcParamName("name") String name)
        throws DaoException;

    public void remove(@RpcParamName("id") Long id)
        throws DaoException;

    public City find(@RpcParamName("id") Long id)
        throws DaoException;

    /**
     * 
     * @param firstResult
     * @param maxResults
     * @param orderBy
     * @param isAsc
     * @param filter may be null
     * @return
     * @throws DaoException
     */
    IResultContainer<City> findRange(@RpcParamName("firstResult") final Integer firstResult,
        @RpcParamName("maxResults") final Integer maxResults,
        @RpcParamName("orderBy") final String orderBy, @RpcParamName("isAsc") final Boolean isAsc, @RpcParamName("filter")CityFilter filter)
        throws DaoException;
    

}
